﻿using Abp.Auditing;
using Abp.Authorization.Users;
using System.ComponentModel.DataAnnotations;

namespace SOEI.Solution.Customized.Dtos
{
    public class OrgRegisterInput
    {

        /// <summary>
        /// 经济机构注册时候需要的密码
        /// </summary>
        [Required]
        [StringLength(AbpUserBase.MaxPlainPasswordLength)]
        [DisableAuditing]
        public string Password { get; set; }

        /// <summary>
        /// 经济机构注册时候的手机号
        /// </summary>
        [Required]
        [DisableAuditing]
        public string PhoneNumber { get; set; }

        //public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
        //{
        //    if (!UserName.IsNullOrEmpty())
        //    {
        //        if (!UserName.Equals(EmailAddress) && ValidationHelper.IsEmail(UserName))
        //        {
        //            yield return new ValidationResult("Username cannot be an email address unless it's the same as your email address!");
        //        }
        //    }
        //}
    }
}
